package com.jk.bo;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @version : V1.0
 * @ClassName: EsDestinationBO
 * @Description:ES 所需BO数据表格
 * @Auther: 郑滨
 * @Date: 2021/7/6 22:08
 */
@Data//shards = 5 主分片 5个,replicas = 2 副本分片为2
@Document(indexName = "destination",type = "sanzu",shards = 5,replicas = 2)
public class EsDestinationBO implements Serializable {
    //景区表
    @Id
    @ApiParam("景区ID")
    private Integer id;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区名称")
    private String areaname;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区编号")
    private Integer areaid;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区状态")
    private Integer areastatus;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区等级")
    private Integer arealevel;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区开放时间")
    private String areaopentime;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区关闭时间")
    private String areaclosetime;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区购票关联ID")
    private Integer ticketid;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区封面")
    private String areacover;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区价格")
    private Double areaprice;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区地点")
    private String areaplace;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区类别")
    private String areatype;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区描述")
    private String areainfo;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区热度")
    private Integer areaheat;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区地区关联id")
    private Integer taid;

    //地区表
    @Field(type = FieldType.Text,store = true)
    @ApiParam("地区ID")
    private Integer aid;
    @Field(type = FieldType.Text,store = true,analyzer = "ik_smart",searchAnalyzer = "ik_max_word")
    @ApiParam("地区名称")
    private String aname;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("景区关联id")
    private Integer typeid;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("地点地址")
    private String areaphoto;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("地点描述")
    private String areainfoi;
    @Field(type = FieldType.Text,store = true)
    @ApiParam("网站")
    private String wangzhan;
}
